#ifndef KERN_LL_H
#define KERN_LL_H 1

#define LIST_ENTRY_PTR(LLPTR, ENTRY_TYPE, LLMEMBER) \
                  (LLPTR == NULL) ? NULL : ((ENTRY_TYPE *)((char *)LLPTR - \
                  (unsigned long)&(((ENTRY_TYPE *)0)->LLMEMBER)))

// following code taken from assignment
typedef struct LLSTRUCT
{
  struct LLSTRUCT *previousPtr;
  struct LLSTRUCT *nextPtr;
} LINKEDLIST, *PLINKEDLIST;





// ptrList is the globa linked list
// ptrObjectList is the linked list within the structure
// to which we add this
void *KernAllocPage(int,int);

void KernAddListEntry(PLINKEDLIST *, PLINKEDLIST );

void KernAddListEntryAfter(PLINKEDLIST *, PLINKEDLIST, PLINKEDLIST);

void KernUnlinkListEntry(PLINKEDLIST *, PLINKEDLIST );

void KernMoveListPtr(PLINKEDLIST *, PLINKEDLIST *, PLINKEDLIST, PLINKEDLIST ); 



#endif
